<?php
/**
 * YouNet
 *
 * @category   Application_Extensions
 * @package    Auction
 * @copyright  Copyright 2011 YouNet Developments
 * @license    http://www.modules2buy.com/
 * @version    $Id: listing auctions
 * @author     Minh Nguyen
 */
class Ynauction_Widget_SearchListingYnauctionsController extends Engine_Content_Widget_Abstract
{
  public function indexAction()
  {
    $viewer = Engine_Api::_()->user()->getViewer();
    $subject = Engine_Api::_()->getItem('ynauction_param', 1);
    $values = null;
    $values['category']= $subject->category; 
    $values['subcategory']= $subject->subcategory; 
    $values['status']= $subject->status; 
    $values['page']= $subject->page; 
    $values['orderby']= $subject->orderby; 
    $values['search']= $subject->search;
    $values['start_time']= $subject->start_time;
    $values['end_time']= $subject->end_time;
    $featured = $subject->featured;
    $now = date('Y-m-d H:i:s');
    // Do the show thing
   $where =" display_home = '1' AND stop = 0 AND approved = '1'";
   $values['where'] = $where;
   $this->view->homeres = $paginator = Engine_Api::_()->ynauction()->getProductsPaginator($values);
   $this->view->user_id = $viewer->getIdentity();
 }
}
?>
